package com.mk.episodecalendar;

import android.content.Context;
import android.content.SharedPreferences;

public class ApplicationPrecferences {
	
	private SharedPreferences _sharedPreferences;
	public ApplicationPrecferences(Context context)
	{
		_sharedPreferences = context.getSharedPreferences("EpisodeCalendarAppData", 0);		
	}
	
	public Boolean getAutoLogin()
	{
        return _sharedPreferences.getBoolean("autoLogin", false);
	}
	public void setAutoLogin(Boolean autoLogin)
	{
		SharedPreferences.Editor editor = _sharedPreferences.edit();
		editor.putBoolean("autoLogin", autoLogin);
		editor.commit();
	}
	
	public String getUserName()
	{
        return _sharedPreferences.getString("userName", "");
	}
	public void setUserName(String userName)
	{
		SharedPreferences.Editor editor = _sharedPreferences.edit();
		editor.putString("userName", userName);
		editor.commit();
	}
	
	public String getAuthKey()
	{
        return _sharedPreferences.getString("authKey", "");
	}
	public void setAuthKey(String authKey)
	{
		SharedPreferences.Editor editor = _sharedPreferences.edit();
		editor.putString("authKey", authKey);
		editor.commit();
	}
}
